import bus from "@/bus";
import { renderButton } from '@/util';
let data = {
  status: 'pass',
  totalItem: 1,
  pageSize: window.$pageSize,
  currentPage: 1,
  departments: [],
  distributors: [],
  form: {
    companyname: '',
    name: '',
    erpsn: '',
    telphone: '',
    brandId: '',
    userType: '',
    storePhone: '',
    businessLicenseNo: '',
    distributorIds: []
  },
  columns: [{
      type: 'selection',
      width: 60,
      align: 'left',
      fixed: 'left'
  }, {
    title: '门头编号',
    key: 'storeNo',
    align: 'left',
    minWidth: 150
  }, {
    title: '门店名称',
    key: 'storeName',
    align: 'left',
    minWidth: 200,
    tooltip: true
  }, {
    title: '门店类型',
    key: 'storeTypeName',
    align: 'left',
    minWidth: 120
  }, {
    title: '门店地址',
    key: 'address',
    align: 'left',
    minWidth: 250,
    tooltip: true
  }, {
    title: '店主姓名',
    key: 'ownerName',
    align: 'left',
    minWidth: 150
  }, {
    title: '店主身份证',
    key: 'ownerIdcardNo',
    align: 'left',
    minWidth: 200
  }, {
    title: '店主手机',
    key: 'ownerPhone',
    align: 'left',
    minWidth: 150
  }, {
    title: '签约联系人',
    key: 'salesmanName',
    align: 'left',
    minWidth: 150
  }, {
    title: '科室',
    key:'officeName',
    align: 'left',
    minWidth: 150
  }, {
    title: '部门',
    key:'depName',
    align: 'left',
    minWidth: 200
  }, {
    title: '原经销商',
    key:'distributorName',
    align: 'left',
    minWidth: 200,
    tooltip: true
  }, {
    title: '原签约品牌',
    key:'masterBrandName',
    align: 'left',
    minWidth: 150,
    tooltip: true
  }, {
    title: '原任务量',
    key:'storeTaskQuantity',
    align: 'right',
    minWidth: 100
  }, {
    title: '操作',
    align: 'left',
    minWidth: 120,
    fixed: 'right',
    render: (h, params) => {
      if (params.row.id) {
       return (
          <div>
            { renderButton(h, { text: '签约信息', type: 'primary' }, ()=>{ bus.$emit("editRow", params.row)})}
          </div>
        )
      }
    }
  }],
  data: [{}]
}
export default data;
